package fina2.dcs.security;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

@Entity
@Table(name = "SYS_USERS")
@SuppressWarnings("serial")
public class User implements Serializable {
	private BigDecimal id;
	private String login;
	private String password;
	private BigDecimal changePassword;
	private BigDecimal nameStrid;
	private BigDecimal titleStrid;
	private String phone;
	private String email;
	private BigDecimal blocked;
	private Date lastLoginDate;
	private Date lastPasswordChangeDate;
	private List<String> userPerms;
	private String name;
	private String title;
	private String confirm;


	
	@Transient
	public List<String> getUserPerms() {
		return userPerms;
	}

	public void setUserPerms(List<String> userPerms) {
		this.userPerms = userPerms;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Id
	@GeneratedValue
	@Column(name = "ID")
	public BigDecimal getId() {
		return id;
	}

	public void setId(BigDecimal id) {
		this.id = id;
	}

	@Column(name = "LOGIN")
	public String getLogin() {
		return login;
	}

	public void setLogin(String login) {
		this.login = login;
	}

	@Column(name = "PASSWORD")
	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Column(name = "CHANGEPASSWORD")
	public BigDecimal getChangePassword() {
		return changePassword;
	}

	public void setChangePassword(BigDecimal changePassword) {
		this.changePassword = changePassword;
	}

	@Column(name = "NAMESTRID")
	public BigDecimal getNameStrid() {
		return nameStrid;
	}

	public void setNameStrid(BigDecimal nameStrid) {
		this.nameStrid = nameStrid;
	}

	@Column(name = "TITLESTRID")
	public BigDecimal getTitleStrid() {
		return titleStrid;
	}

	public void setTitleStrid(BigDecimal titleStrid) {
		this.titleStrid = titleStrid;
	}

	@Column(name = "PHONE")
	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	@Column(name = "EMAIL")
	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	@Column(name = "BLOCKED")
	public BigDecimal getBlocked() {
		return blocked;
	}

	public void setBlocked(BigDecimal blocked) {
		this.blocked = blocked;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "LASTLOGINDATE")
	public Date getLastLoginDate() {
		return lastLoginDate;
	}

	public void setLastLoginDate(Date lastLoginDate) {
		this.lastLoginDate = lastLoginDate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "LASTPASSWORDCHANGEDATE")
	public Date getLastPasswordChangeDate() {
		return lastPasswordChangeDate;
	}

	public void setLastPasswordChangeDate(Date lastPasswordChangeDate) {
		this.lastPasswordChangeDate = lastPasswordChangeDate;
	}

	@Transient
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Transient
	public String getTitle() {
		return title;
	}

	@Transient
	public String getConfirm() {
		return confirm;
	}

	public void setConfirm(String confirm) {
		this.confirm = confirm;
	}

	
    
	
}
